class Solution(object):
    def reachingPoints(self, sx, sy, tx, ty):
        if tx == ty:
            if tx == sx == sy:
                return True
            else:
                return False
        else:
            if ty > tx:
                tx, ty, sx, sy = ty, tx, sy, sx
            while tx > sx:
                new_tx = tx % ty
                if new_tx >= sx:
                    tx = new_tx
                else:
                    if (tx - sx) % ty == 0:
                        tx = sx
                    else:
                        return False
                if ty > tx:
                    tx, ty, sx, sy = ty, tx, sy, sx
            if tx == sx and ty == sy:
                return True
            else:
                return False

data = Solution()
sx = 1
sy = 1
tx = 100000000
ty = 2
print(data.reachingPoints(sx, sy, tx, ty))
